import request from '@/utils/request'

export function login (data) {
  console.log('use.js-data', data)
  return request({
    // url: '/vue-admin-template/user/login',
    url: '/admin_login',
    method: 'post',
    data
  })
}

export function getInfo (token) {
  console.log('use.js-token', token)

  return request({
    // url: '/vue-admin-template/user/info',
    url: '/admin_getuserinfo',
    // url: '/admin_login',
    method: 'get',
    // method: 'post',
    params: { token }
  })
}

export function logout () {
  // console.log('use.js-data', data)

  return request({
    // url: '/vue-admin-template/user/logout',
    url: '/user/logout',
    method: 'post'
  })
}
